<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>Table</title>
	<link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all"/>
	<link rel="stylesheet" href="/static/css/global.css" media="all">
	<link rel="stylesheet" href="/static/plugins/font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="/static/css/table.css"/>
</head>

<body>
<div class="admin-main">
	<blockquote class="layui-elem-quote">
		<a href="list.html" class="layui-btn layui-btn-small">
			<i class="layui-icon">&#xe608;</i> 应用列表
		</a>
	</blockquote>

	<div class="layui-field-box layui-form" id="content" templateLoad="" template-id="list_tpl"></div>
</div>

<!--模板-->
<script type="text/html" id="list_tpl">
	{{# layui.each(d, function(index, item){ }}
	<fieldset class="layui-elem-field">
		<legend>所属环境:{{ index }}</legend>
		<div class="layui-field-box">
			<form class="layui-form" action="/admin/appSecret/update">
				<input type="hidden" name="appId" value="{{item[0].appId}}">
				<input type="hidden" name="env" value="{{item[0].env}}">

				<div class="layui-form-item">
					<label class="layui-form-label" style="width:150px;">DES密钥</label>
					<div class="layui-input-block" style="margin-left:180px;">
						<input class="layui-input" value="{{ item[0].secretKey }}" readonly="readonly">
					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label" style="width:150px;">RSA KEY ALIAS</label>
						<div class="layui-input-inline">
							<input name="secretKey" value="{{ item.length == 2 ? item[1].secretKey : '' }}"
								   class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label" style="width:150px;">RSA KEY PASSWORD</label>
						<div class="layui-input-inline">
							<input name="secretPass" type="password"
								   value="{{ item.length == 2 ? item[1].secretPass : '' }}" class="layui-input">
						</div>
						<div class="layui-input-inline">
							<input type="button" class="layui-btn J_ajaxSubmit" onSuccessJumpurl="./list.html" value="保存"/>
						</div>
					</div>
				</div>

			</form>
		</div>
	</fieldset>
	{{# }); }}
</script>

<script type="text/javascript" src="/static/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/common.js?v20180106?a=91"></script>
</body>
</html>